package com.starview.star.compiler.canonical.compile.cont;

import com.starview.platform.data.type.Location;
import com.starview.star.compiler.canonical.IContentPattern;
import com.starview.star.compiler.canonical.compile.CompileContext;
import com.starview.star.compiler.canonical.compile.Continue;
import com.starview.star.compiler.canonical.compile.FrameState;
import com.starview.star.compiler.canonical.compile.PatternCompile;

public class PttrnCont implements Continue
{
  private final IContentPattern ptn;
  private final CompileContext ptnCxt;

  public PttrnCont(IContentPattern ptn, CompileContext ptnCxt)
  {
    this.ptn = ptn;
    this.ptnCxt = ptnCxt;
  }

  @Override
  public FrameState cont(FrameState src, Location loc, CompileContext ccxt)
  {
    ptn.transformPattern(new PatternCompile(), ptnCxt);
    return src;
  }

  @Override
  public boolean isJump()
  {
    return false;
  }

}
